﻿using System;
using UnityEngine;

// Token: 0x02000034 RID: 52
public class rotateAllAxis : MonoBehaviour
{
	// Token: 0x060002CF RID: 719 RVA: 0x00013B4C File Offset: 0x00011D4C
	private void Start()
	{
		if (this.XspeedMax > 0 && this.XspeedMin > 0)
		{
			this.xSpeed = UnityEngine.Random.Range(this.XspeedMin, this.XspeedMax);
		}
		if (this.YspeedMax > 0 && this.YspeedMin > 0)
		{
			this.ySpeed = UnityEngine.Random.Range(this.YspeedMin, this.YspeedMax);
		}
		if (this.ZspeedMax > 0 && this.ZspeedMin > 0)
		{
			this.zSpeed = UnityEngine.Random.Range(this.ZspeedMin, this.ZspeedMax);
		}
	}

	// Token: 0x060002D0 RID: 720 RVA: 0x00013BE8 File Offset: 0x00011DE8
	private void FixedUpdate()
	{
		if (this.xSpeed > 0)
		{
			base.transform.Rotate(Time.deltaTime * (float)this.xSpeed, 0f, 0f, Space.Self);
		}
		if (this.ySpeed > 0)
		{
			base.transform.Rotate(0f, Time.deltaTime * (float)this.ySpeed, 0f, Space.Self);
		}
		if (this.zSpeed > 0)
		{
			base.transform.Rotate(0f, 0f, Time.deltaTime * (float)this.zSpeed, Space.Self);
		}
	}

	// Token: 0x040001B1 RID: 433
	public int XspeedMin;

	// Token: 0x040001B2 RID: 434
	public int XspeedMax;

	// Token: 0x040001B3 RID: 435
	public int YspeedMin;

	// Token: 0x040001B4 RID: 436
	public int YspeedMax;

	// Token: 0x040001B5 RID: 437
	public int ZspeedMin;

	// Token: 0x040001B6 RID: 438
	public int ZspeedMax;

	// Token: 0x040001B7 RID: 439
	private int xSpeed;

	// Token: 0x040001B8 RID: 440
	private int ySpeed;

	// Token: 0x040001B9 RID: 441
	private int zSpeed;
}
